<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .select-editable {
      position: relative;
      background-color: white;
      border: solid grey 1px;
      width: 120px;
      height: 18px;
    }

    .select-editable select {
      position: absolute;
      top: 0px;
      left: 0px;
      font-size: 14px;
      border: none;
      width: 120px;
      margin: 0;
    }

    .select-editable input {
      position: absolute;
      top: 0px;
      left: 0px;
      width: 100px;
      padding: 1px;
      font-size: 12px;
      border: none;
    }

    .select-editable select:focus,
    .select-editable input:focus {
      outline: none;
    }
  </style>

  <script src="https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js"></script>
</head>

<body>
  <div class="select-editable">
    <select onchange="this.nextElementSibling.value=this.value" id="cookies">
      <!-- <option value=""></option>
      <option value="115x175 mm">115x175 mm</option>
      <option value="120x160 mm">120x160 mm</option>
      <option value="120x287 mm">120x287 mm</option> -->
    </select>
    <input type="text" name="format" value="" />
  </div>

  <script>
    window.onload = function () {
      var optionList = [
        { value: '1' },
        { value: '2' },
        { value: '3' },
        { value: '4' },
        { value: '5' },
      ]
      $('#cookies').empty()
      if (optionList && optionList.length > 0) {
        for (var i = 0; i < optionList.length; i++) {
          $('#cookies').append(`<option value="` + optionList[i].value + `">`+optionList[i].value+`</option>`);
        }
      }
    }
  </script>
</body>

</html>
